<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Document Dispatch</title>

<%@ include file="links.jsp" %>
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript"> 
 
  //Load the Visualization API and the ready-made Google table visualization
  google.load('visualization', '1', {'packages':['table']});
 
  // Set a callback to run when the API is loaded.
  google.setOnLoadCallback(init);
 
  // Send the query to the data source.
  function init() {
 
    // Specify the data source URL.
    var query = new google.visualization.Query('../searchresultsview?year=<%=request.getParameter("year")%>&month=<%=request.getParameter("month")%>&day=<%=request.getParameter("day")%>&completedBy=<%=request.getParameter("completedBy")%>&salesOrderId=<%=request.getParameter("salesOrderId")%>&searchAllDates=<%=request.getParameter("searchAllDates")%>');

		// Send the query with a callback function.
		query.send(handleQueryResponse);
	}

	// Handle the query response.
	function handleQueryResponse(response) {
		if (response.isError()) {
			alert('Error in query: ' + response.getMessage() + ' '
					+ response.getDetailedMessage());
			return;
		}

		// Draw the visualization.
		var data = response.getDataTable();
		var chart = new google.visualization.Table(document
				.getElementById('chart_div'));
		chart.draw(data, {
			'sortColumn' : 5,
			'sortAscending' : false,
			allowHtml : true
		});
	}
</script>

</head>
<body id="index">

<div id="page" class="xgrid xfluid">

<div id="header" class="x12">
<div class="xpad">
<h1>Archive</h1>
</div>
</div>
<%@ include file="headermenu.jsp" %>
</div>


<center>
<div id="chart_div"></div>
</center>
</body>
</html>